package com.fanco.learn_datastruct_leetcode.designpattern.proxy.dynamicproxy;

/**
 * @author qiaowang 2022/2/16
 * 描述
 */
public class Client {
    public static void main(String[] args) {

        // 创建目标对象
        TeacherDao teacherDao = new TeacherDao();

        ITeacherDao proxyInstance = (ITeacherDao)new ProxyFactory(teacherDao).getProxyInstance();
        proxyInstance.teach();

        System.out.println(proxyInstance);
    }
}
